package com.zp.self.module.level_5_设计模式.行为型模式.Ⅶ_中介者模式;

import lombok.Getter;

import java.util.List;

/**
 * @author ：by Zeng Peng
 * @date ：Created 2022/7/4 21:19
 * @description ：
 */
@Getter
public abstract class AbstractTarget {
    private Mediator mediator;
    private String userName;

    public AbstractTarget(Mediator mediator,String userName) {
        this.mediator = mediator;
        this.userName = userName;
        this.mediator.registerUser(this,userName);
    }

   abstract void send(List<String> userNames,String msg);

   abstract void receive(String msg);
}
